# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-deferred
pkgver=0.5.1
pkgrel=0
_pkgreal=deferred
pkgdesc="Manage asynchronous tasks in Elisp"
url="https://github.com/kiwanami/emacs-deferred"
arch="noarch"
license="GPL-3.0-or-later"
depends="cmd:emacs"
makedepends="emacs-nox"
source="https://github.com/kiwanami/emacs-deferred/archive/v$pkgver/emacs-deferred-$pkgver.tar.gz"
options="!check" # tests require unpackaged "undercover"

build() {
	emacs -batch -q -no-site-file -L . \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
357890f73917c7929cbb79f71a26901ac24abe9ea532181b730deee8eba97709b41c360904e2a2a8028ee1295e7ae845da5c702c74256a450f3d144080960a2b  emacs-deferred-0.5.1.tar.gz
"
